package org.lds.message.center.alipay.consumer;

import org.apache.kafka.clients.consumer.ConsumerRecord;
import org.lds.message.center.alipay.AlipayMessageService;
import org.lds.message.center.common.model.request.AlipayRequest;
import org.lds.message.center.plugin.core.kafka.MessageServiceKafkaConsumer;
import org.springframework.kafka.annotation.KafkaListener;
import org.springframework.kafka.support.Acknowledgment;

import java.util.List;

public class AlipayConsumer extends MessageServiceKafkaConsumer<AlipayRequest> {

    public AlipayConsumer(AlipayMessageService alipayMessageService) {
        super(alipayMessageService, AlipayRequest.class);
    }

    @Override
    @KafkaListener(topics = {"${message-center.alipay.topic}"}, groupId = "${message-center.alipay.group-id}")
    public void consume(List<ConsumerRecord<String, String>> records, Acknowledgment ack) {
        super.consume(records, ack);
    }

}
